package org.zoomdev.zoom.dao;

import org.zoomdev.zoom.common.caster.Caster;

import java.math.BigDecimal;
import java.util.List;

public final class Values {

    private final List<Object> values;

    public Values(List<Object> values) {
        this.values = values;
    }


    public int getInt(int index) {
        return Caster.to(values.get(index), int.class);
    }

    public Integer getInteger(int index) {
        return Caster.to(values.get(index), Integer.class);
    }

    public BigDecimal getBigDecimal(int index) {
        return Caster.to(values.get(index), BigDecimal.class);
    }

    public Object get(int index) {
        return values.get(index);
    }


}
